import corejuliano.gameelement.agent.*;
import corejuliano.gameelement.agent.ai.*;
import corejuliano.gameelement.*;
import corejuliano.ai.*;

class corejuliano.gameelement.agent.Agent extends Tileable
{
	private var intelligence:Intelligence;
	
	public function Agent(id:String)
	{
		super(id);
		intelligence = new Intelligence(id);
	}
	
	public function createModel(id:String):Void
	{
		model = new AgentModel(id);
	}
	
	public function setIntelligence(intelligence:Intelligence):Void
	{
		this.intelligence = intelligence;
		addObserver(intelligence);
		intelligence.setOwner(this);
	}
	
	public function getIntelligence():Intelligence
	{
		return intelligence;
	}
	
	public function destroy():Void
	{
		intelligence = null;
		model = null;
		super.destroy();
	}
	
}